﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Odd or Even</title>
</head>
<body>
    <label for="textIn">Enter number: </label>
    <input id="textIn" type="text" name="name" value=" " />
    <label for="textOut">result:</label>
    <input id="textOut" type="text" name="name" value=" " />
    <input type="button" name="name" value="GO" onclick="OddOrEven()" />

    <script>
        function OddOrEven() {
            var number = parseInt(document.getElementById("textIn").value);
            if (number % 2 == 0) {
                document.getElementById("textOut").value = "number is even.";
            }
            else {
                document.getElementById("textOut").value = "number is odd.";
            }
        }
    </script>
</body>
</html>
